//package com.xiaotao.test01.service;
//
//import cn.hutool.core.lang.UUID;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.Resource;
//
//@Service
//@Slf4j
//public class TestService {
//    @Resource
//    private DynamicSchedulerService dynamicSchedulerService;
//
//    public void threadTest() {
//        String uuid = UUID.fastUUID().toString();
//        dynamicSchedulerService.sendMessageScheduledTask(uuid,"hello",10,80,"1");
//        System.out.println("主线程");
//        log.debug("主线程：SQL 执行中，耗时 " + 50 + " 秒");
//        try {
//            Thread.sleep(15 * 1000L);
//            dynamicSchedulerService.cancelScheduledTask(uuid);
//            System.out.println("主线程：SQL 执行完成");
//            System.out.println("发送消息 ：" + "hello" + " 计数:" + "80%");
//        } catch (Exception e) {
//            dynamicSchedulerService.cancelScheduledTask(uuid);
//            System.out.println("主线程异常");
//            e.printStackTrace();
//        }
//
//    }
//
//}
